package com.itheima.reggie.dao;

import com.itheima.reggie.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

public interface UserDao {
    @Select("select * from user where phone=#{phone}")
    User getByPhone(String phone);
    @Insert("insert into user(phone,status) values(#{phone},#{status})")
    @Options(useGeneratedKeys = true, keyColumn = "id", keyProperty = "id")
    void save(User user);
}
